package main

import "fmt"

type Human struct {
	name   string
	age    int
	weight float64
}

func main() {

	//num0 will be allocated memory
	var num0 int
	println("1----->", num0, "<------")

	//new return pointer
	println("2----->", new(int), "<------")

	//arr
	println(
		"3----->",
		//[2]int{},
		//[...]int{1, 2, 3},
		"<------")

	//slice
	arr1 := [10]int{}
	println(
		"4----->",
		make([]int, 2, 3),
		[]int{1, 2, 3},
		arr1[:],
		arr1[0:],
		arr1[:1],
		arr1[0:1:2],//TODO
		"<------")

	//'make' use to allocate and init memory of types in (map channel slice)
	m := make(map[string]int, 10)
	aaa:=new(map[string]int)
	ch := make(chan int, 1)
	fmt.Printf("1---->%#v\n",aaa)
	fmt.Printf("2---->%#v\n",ch)
	fmt.Printf("3---->%#v\n",m)
}
